if ~exists('InstallData/Muirexx')|~exists('InstallData/Icon.mcc')|~exists('InstallData/Config')|~exists('InstallData/Friends')|~exists('InstallData/Images/buttons.gif')|~exists('InstallData/Reqtools.library')|~exists('InstallData/RexxReqtools.library') then do
cecho(pr,bld('Fatal Error: Missing Install files in InstallData directory!'))
cecho(pr,'Maybe you installed already and then InstallData directory would have been deleted?')
cecho(pr,'In that case decompress the archive again.')
exit
end
if ~exists('Rexx/Kuang11C.AMIRX')|~exists('Rexx/Kuang11CMD.AMIRX')|~exists('Rexx/Kuang11XDCC.AMIRX')|~exists('Rexx/Kuang11GUI.amirx')|~exists('Rexx/Kuang11.AMIRX') then do
cecho(pr,bld('Fatal Error: Missing program files!'))
alias('hiall',"/rx '"||'options results;"GETUSERS";x=%p translate(compress(result,"@+"),","," ");do until x=''|length(x)=1;p=min(length(x),150);parse var x y =p x;"SAY" y;end'||"'")
alias('axdcc',"/rx '"||'options results;x="%p";parse var x n r;"SAY /CTCP" n "XDCC" r'||"'")
cecho(pr,bld('Installing support scripts'))
cecho(pr,'Installing KickerKit by K."deluxe" Stenström Aliases')
if exists('rexx/butt.amirx') then alias('butt','/rx butt.amirx %p')
if exists('rexx/momma.amirx') then alias('momma','/rx momma.amirx %p')
if exists('rexx/Philosophy.amirx') then alias('phil','/rx Philosophy.amirx %p')
if exists('rexx/pinkybrain.amirx') then alias('pinky','/rx pinkybrain.amirx %p')
if exists('rexx/rin.amirx') then alias('rin','/rx rin.amirx %p')
if exists('rexx/splatt.amirx') then alias('splatt','/rx splatt.amirx %p')
cecho(pr,'Installing BillGates famous quotes alias')
if exists('rexx/BillGates.AMIRX') then alias('bill','/rx billgates.amirx')
if exists('Rexx/Kuang11FLD.AMIRX') then do
cecho(pr,'Installing Kuang Force Alias')
aliasfld('kf','%p')
alias('nfdeop','/rx kuang11.amirx :MDEOP mdeop')
end
if exists('Rexx/CLone.AMIRX') then do
cecho(pr,'Installing KClone Alias')
alias('clone','/rx clone %p')
end
if exists('Kuang_Eleven.guide') then do
cecho(pr,'Installing KHELP Alias')
if exists('sys:utilities/multiview') then alias('khelp',"/rx '"||'address command "SYS:Utilities/MultiView Kuang_eleven.guide"'||"'")
when show('P','MIAMI.1') then cecho(pr,'TCP Tracker not compatible with Miami')
when ~exists('amitcp:bin/askhost') then cecho(pr,'TCP Tracker is missing AmiTCP:Bin/AskHost command')
when ~exists('amitcp:bin/sanamon') then cecho(pr,'TCP Tracker is missing AmiTCP:Bin/SanaMon command')
otherwise
l=showlist('D')
Select
when pos('ppp.device',l)~=0 then alias('track','/rx tracker ppp.device %p')
when pos('slip.device',l)~=0 then alias('track','/rx tracker slip.device %p')
when pos('aslip.device',l)~=0 then alias('track','/rx tracker aslip.device %p')
when pos('rhslip.device',l)~=0 then alias('track','/rx tracker rhslip.device %p')
when pos('rhcslip.device',l)~=0 then alias('track','/rx tracker rhcslip.device %p')
otherwise
cecho(pr,'I dont know what Net Device you are using!Cant Install /Track Alias!')
end
end
end
aliases26:
cecho(pr,'Installing GUI Alias')
alias('kgui',"/rx '"||'if show(P,KUANG) then do;address KUANG SHOW;exit;end;pragma(S,20000);address command "sys:rexxc/muirexx rexx/kuang11gui.amirx PORT KUANG HELP Kuang_Eleven.guide"'||"'")
x=statef('Default.AmIRCfg')
parse var x . . . . x
do forever
x1=rtezrequest("Done adding aliases." || NL ||"Now Select Save as defaults from the AmIRC Settings menu"||NL||"before closing this requester.","I Saved|Abort",pr,tags)
if x1=0 then do
cecho(pr,'No save no install')
exit
end
x1=statef('Default.AmIRCfg')
parse var x1 . . . . x1
if x~=x1 then leave
cecho(pr,bld('Dont lie to me I can see the date on that file hasnt changed!'))
end
if cver(kver,2.5) then do
cecho(pr,'Finished short install')
signal cleanup
end
/**/
/*Modify Config*/
/**/
if exists('sys:utilities/multiview') then do
if version('sys:utilities/multiview')>=40.8 then str='PORTNAME MULTIKUANG';else str=''
else cecho(pr,'Missing SYS:Utilities/MultiView - I can not display preview of buttons.')
instbut=rtezrequest("Would you like to install the 24 Special buttons"||NL||"for the AmIRC Userlist window?","Install|Dont",pr,tags)
if show('P','MULTIKUANG') then address MULTIKUANG "QUIT"
cecho(pr,'This may take a few seconds...')
open(1,'Default.AmIRCfg','R')
open(2,'InstallData/Default.AmIRCfg','W')
do until eof(1)
ln=readln(1)
id=upper(word(ln,1))
Select
when id='MSG_QUIT' then if pos('PHOENIX',upper(ln))~=0 then do
ln='MSG_QUIT' bld('Kuang Eleven Terminating')
cecho(pr,'Replaced lame phoenix Quit message')
end
when id='MSG_KICK' then if pos('PHOENIX',upper(ln))~=0 then do
ln='MSG_KICK' bld('Kuang Eleven')
cecho(pr,'Replaced lame phoenix kick message')
end
when id='AUTOAWAY_RESET' then ln='AUTOAWAY_RESET 0'
when id='EVENT_PRIV'|id='EVENT_INVITE'|id='EVENT_NOTICE'|id='EVENT_JOIN'|id='EVENT_PRIV'|id='EVENT_KICK'|id='EVENT_MODE' then ln=delstr(ln,lastpos(',',ln))',T:Kuang11.amirx %p'
when id='EVENT_CTCP' then ln=delstr(ln,lastpos(',',ln))',T:Kuang11.amirx ctcp%p'
when id='EVENT_DCC' then ln=delstr(ln,lastpos(',',ln))',T:Kuang11.amirx dcc%p'
when id='EVENT_HILITE' then ln=delstr(ln,lastpos(',',ln))',T:Kuang11.amirx hilite%p'
when instbut&left(id,6)='USEROP' then do
Select
when id='USEROP0' then ln='USEROP0 Query,/QUERY %u'
when id='USEROP1' then ln='USEROP1 Chat,/DCC CHAT %u'
when id='USEROP2' then ln='USEROP2 Ping,/PING %u'
when id='USEROP3' then ln='USEROP3 Send,/DCC SEND %u'
when id='USEROP4' then ln='USEROP4 Uinfo,/CTCP %u USERINFO'
when id='USEROP5' then ln='USEROP5 Version,/CTCP %u VERSION'
when id='USEROP6' then ln='USEROP6 Get XDCC,/ctcp %u xdcc list'
when id='USEROP7' then ln='USEROP7 Page,/ctcp %u PAGE'
when id='USEROP8' then ln='USEROP8 Kick,/KICK %u'
when id='USEROP9' then ln='USEROP9 Ban,/QKICK %u'
when id='USEROP10' then ln='USEROP10 Op,/OP %u'
when id='USEROP11' then ln='USEROP11 DeOp,/DEOP %u'
when id='USEROP12' then ln='USEROP12 PermBan,/Pban %u'
when id='USEROP13' then ln='USEROP13 KGui,/KGUI'
when id='USEROP14' then ln='USEROP14 KHelp,/KHELP'
when id='USEROP15' then ln='USEROP15 XDCC PList,/XDCC PLIST'
when id='USEROP16' then ln='USEROP16 XDCC SList,/XDCC SList'
when id='USEROP17' then ln='USEROP17 XDCC Noti,/XDCC NOTI'
when id='USEROP18' then ln='USEROP18 XDCC List,/XDCC LIST'
when id='USEROP19' then ln='USEROP19 XDCC Add,/XDCC ADDP'
when id='USEROP20' then ln='USEROP20 Add Friends,/Addf %u all'
when id='USEROP21' then ln='USEROP21 Add Host,/addh %u'
when id='USEROP22' then ln='USEROP22 Away/Back,/Away'
when id='USEROP23' then ln='USEROP23 Ping Channel,/pc'
call rtezrequest("A new AmIRC configuration file has been created."|| NL ||"Select Load Settings from Default on the AmIRC settings menu"||NL||"before closing this requester.","I have",pr,tags)
/**/
/*Install Presets*/
/**/
if rtezrequest("Would you like to install the SoundLeech plugins?"||NL||"-PING plugin to play PING.WAV."||NL||"-SOUND plugin to request sounds you dont have."||NL||"-GETSOUND plugin to send sounds on CTCP request."||NL||"Any of those may be easily deactivated via the GUI!"||NL||"This will overwrite your current Plugins config!","Yes|NO WAY!",pr,tags)=1 then do
cmd='';scr=''
if exists('rexx/ctcp/ping.amirx') then do
cmd='PING'
scr='ping.amirx'
end
else cecho(pr,'Missing ping.amirx')
if exists('rexx/ctcp/getsound.amirx') then do
cmd=cmd 'GETSOUND'
scr=scr 'getsound.amirx'
end
else cecho(pr,'Missing getsound.amirx')
if exists('rexx/ctcp/autogetsounds.amirx') then do
cmd=cmd 'SOUND'
scr=scr 'autogetsounds.amirx'
end
else cecho(pr,'Missing autogetsounds.amirx')
cmd=strip(cmd)
scr=strip(scr)
if cmd~=''&scr~='' then do
open(1,'Kuang11/Config','A')
writeln(1,'extrctcp' cmd)
writeln(1,'extrscr' scr)
close(1)
cecho(pr,'Installed' cmd 'CTCP plugins.')
end
else cecho(pr,'Installation of plugins failed!')
end
x=getclip('sc_pubcmd')
if x~='' then if rtezrequest("Would you like to install the Modes and RemoteSysop public channel commands?"||NL||"This is highly reccomended for maintaining compatibility with a K¹¹ 2.1 Setup."||NL||"This will overwrite your current Channel Commands config!","Yes|NO WAY!",pr,tags)=1 then x=''
if x='' then do
open(1,'Kuang11/Config','A')
writeln(1,'pubcmd VOICE UNVOICE OP ADDF ADDH SETF SAVE')
cecho(pr,'Installed Public commands : Modes and RemoteSysop')
end
if exists('env:TIADCC') then do
cecho(pr,'You are using TIA TCP/IP Emulator.When K¹¹ is initialised the required ENV variable TIADCC will be set with the correct host name.')
open(1,'Kuang11/Config','A')
writeln(1,'tia ON')
close(1)
end
if word(statef('Kuang11/Friends'),2)='124' then if rtezrequest("You seem to have the default friends list" || NL || "with the authors entries." || NL || "Would you like to keep it?","Keep it|Delete it",pr,tags)=0 then do
delete('Kuang11/Friends')
cecho(pr,'You are now friend-less')
end
if exists('Kuang_Eleven') then do
delete('Kuang_Eleven')
if exists('Kuang ELeven.info') then delete('Kuang ELeven.info')
cecho(pr,bld('I have removed the Kuang_Eleven icon.Kuang no longer requires to be started with it.Start AmIRC normally'))
end
else cecho(pr,bld('Unable to removed the Kuang_Eleven icon.Kuang no longer requires to be started with it.Start AmIRC normally'))
if exists('Rexx/kuang11pub.amirx') then do
delete('Rexx/kuang11pub.amirx')
cecho(pr,bld('I have removed rexx/kuang11pub.amirx which is no longer required'))
end
else cecho(pr,bld('Unable to removed rexx/kuang11pub.amirx which is no longer required'))
/**/
/*Cleanup*/
/**/
Cleanup:
if delete=1 then do
address command 'delete InstallData ALL QUIET'
delete('InstallData')
end
cecho(pr,'Deleted install files')
/**/
/*Finish*/
/**/
cecho(pr,bld('Checking K¹¹ config'))
'SAY /load'
do 5 until getclip('st_init')==1
delay(200)
end
x=getclip('sc_sensordcc')
if x='' then x=0
if x<5 then do
setclip('sc_sensordcc',5)
cecho(pr,'Your DCC flood sensor was incorectly set at' x'. I have set it to 5.')
save=1
end
x=getclip('sc_sensorctcp')
if x>3 then if rtezrequest("AmIRC's internal flood protection sensor is set at 4 hits."||NL||"Inorder for K¹¹ to intercept floods before AmIRC,"||NL||" I will now set CTCP sensor to 3.","Great do it|Dont do it",pr,tags)=1 then do
setclip('sc_sensorctcp',3)
cecho(pr,'Your CTCP flood sensor was incorectly set at' x'. I have set it to 3.')
save=1
end
x=getclip('sc_rvg')
if x='ON'|x='NONP' then
if getclip('sc_rvgd')~='ON'&getclip('sc_rvgb')~='ON'&getclip('sc_rvgk')~='ON' then do